package service.impl;

import bean.Product;
import dao.impl.ProductDaoImpl;
import service.ProductService;

import java.util.ArrayList;

public class ProductServiceImpl implements ProductService {
    ProductDaoImpl productDao = new ProductDaoImpl();
    @Override
    public ArrayList<Product> queryAll() {

        return productDao.queryAll();
    }

    @Override
    public int deleteById(Integer id) {
        return productDao.delete(id);
    }

    @Override
    public int insert(Product product) {
        return productDao.insert(product);
    }

    @Override
    public int update(Product product) {
        return productDao.update(product);
    }
}
